<script setup lang='ts'>
import qs from 'qs';
import "vue3-layer/dist/s3Layer.css";
import { ElMessage } from "element-plus";
import { useRoute } from "vue-router";
import { emitter } from "@/utils/mitt";
import { ref, onMounted, nextTick, reactive, onBeforeUnmount, computed } from "vue";
const prop = defineProps({
  dialog: {
    type: Boolean,
    default: false
  }
});
const route = useRoute();
// 拖拽窗口大小
function resizing2(e) {
  e[0].style.height = (e[0].offsetHeight - 10) + 'px';
}



onBeforeUnmount(() => {
  try {
    document.querySelector(".layui-layer").style.display = "none";
  } catch (error) {
    return
  }
})
</script>

<template>
  <s3-layer v-model="prop.dialog" :area="['850px', '600px']" :maxmin="true" :btn="[]" :closeBtn="1" :shade="0"
    title="任务名称" @resizing="resizing2">
    <div class="task_content">
      <slot></slot>
      <!-- <span>插槽内容</span> -->
    </div>
  </s3-layer>
</template>
<style>
/* 拖拽窗口 固定样式 */
.layui-layer {
  z-index: 55 !important;
}

.layui-layer-title {
  font-size: 18px;
  font-weight: bold;
  background-color: #eaf2ff;
  color: #6489CF;
}

.layui-layer-content {
  padding: 5px 10px !important;
}

.layui-layer-setwin {
  /* background-color: #80B0FF; */
  background-color: #d8d8d8;
  padding: 5px 4px;
  border-radius: 50px;
  color: white;
  top: 10px;
}

.layui-layer-setwin a {
  margin-left: 2px;
}
</style>

<style scoped>
:deep(.el-tabs__item) {
  color: #1749A6;
  background: url(@/assets/studen/images/rn_no_active.png) no-repeat;
  background-position: center;
  background-size: 100% 100%;
  padding: 0 20px;
  margin-right: 20px;
}

:deep(.el-tabs__item.is-active) {
  color: white;
  background: url(@/assets/studen/images/rn_is_active.png) no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

:deep(.el-tabs--top .el-tabs__item.is-top:nth-child(2)) {
  padding-left: 20px;
}

:deep(.el-tabs__item.is-top:last-child) {
  padding-right: 20px;
}

:deep(.el-tabs__active-bar) {
  background-color: transparent;
}

.mytasklist {
  border: 1px solid #EEEEEE;
}

.mytasklist .table_thead {
  width: 100%;
  background-color: #f2f6fd;
  height: 38px;
  line-height: 38px;
}

.table_tbody {
  height: calc(500px - 100px);
  overflow: auto;
}

.table_tips_text {
  line-height: 30px;
  background: #eaf2ff;
  padding: 0 10px;
}

.mytasklist :deep(.wcqk_tab) {
  background-color: #fff;
}

.mytasklist :deep(.wcqk_tab tr td) {
  border: 1px solid #EEEEEE;
}

.mytasklist dl {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 38px;
  font-size: 16px;
}

.mytasklist dl dd {
  padding-right: 15px;
}

:deep(.cha-icon) {
  color: red;
}

:deep(.gou-icon) {
  color: green;
}

/* ------- */
.TaskDetailRemark {
  height: 100%;
}

:deep(.TaskDetailRemark table tr td) {
  border: 1px solid;
}
</style>
